﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Birthday
{
    public partial class StartForm : Form
    {
        ListBox[] allListBoxes;
        List<Control> allMaskedTextBox;
        List<Control> allLabel;
        public StartForm()
        {
            InitializeComponent();

            SetControlsProperties();

            BindingData();
        }



        private void BindingData()
        {
            string[] peoplesName = DataLayer.GetPeopleName();
            Array.Sort(peoplesName);
            for (int i = 0; i < peoplesName.Length; i++)
            {
                peoplesName[i] = string.Format("{0:D3}   {1}", (i + 1), peoplesName[i]);
            }
            foreach (ListBox lb in this.allListBoxes)
            {
                lb.Items.Clear();
                lb.Items.AddRange(peoplesName);
            }
        }

    }
}
